package com.ruoyi.system.task;

import com.ruoyi.system.service.IOkrThumbsUpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * @author Bruce
 */
@EnableScheduling
@Configuration
public class ThumbsTask {
    @Autowired
    private IOkrThumbsUpService thumbsUpService;

    @Scheduled(cron = "* 0/10 * * * ?")
    private void translate2DB(){
        thumbsUpService.transLikedCountFromRedis2DB();
        thumbsUpService.transLikedFromRedis2DB();
    }
}
